package com.bestom.t9mod.core.api;

import android.content.Intent;
import android.provider.Settings;

import java.io.IOException;

public class T9IntentApi {

    //关机广播intent
    public static Intent getSys_ShutDownIntent(boolean KEY_CONFIRM){


        Intent shutdown = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");
        //true 弹窗是否关机窗口
        shutdown.putExtra("android.intent.extra.KEY_CONFIRM", KEY_CONFIRM);
        shutdown.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        return shutdown;
    }
    //重启广播intent
    public static Intent getSys_RebootIntent(){
        Intent reboot = new Intent(Intent.ACTION_REBOOT);
        return reboot;
    }
    //跳转系统WIFI设置intent
    public static Intent getSettings_WIFI(){
        Intent wifi = new Intent(Settings.ACTION_WIFI_SETTINGS);
        return wifi;
    }
    //跳转系统BLUTOOTH设置intent
    public static Intent getSettings_BLUETOOTH(){
        Intent bt = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS);
        return bt;
    }
    //跳转系统流量使用情况设置intent
    public static Intent getSettings_DataUsage(){
        Intent dataUsage = new Intent();
        dataUsage.setClassName("com.android.settings","com.android.settings.Settings$DataUsageSummaryActivity");
        return dataUsage;
    }
    //跳转系统移动网络设置intent
    public static Intent getSettings_CallNetWork(){
        Intent dataUsage = new Intent();
        dataUsage.setClassName("com.android.phone","com.android.phone.MobileNetworkSettings");
        return dataUsage;
    }

}
